﻿/**
 * @class app
 * @namespace app
 * @singleton
 */
app = {
    /**
     * @property
     */
    page: null,

    /**
     * @property
     */
    eventMgr: new Ext.util.Observable(),
    
    /**
     * @method
     */
    init: function() {
        app.eventMgr.addEvents(
            'SelectForum',
            'SelectThread',
            'ForumList',
            'BackToThreadList',
			'InfoDetail',
			'BackToMain',
			'Login',
			'loginBackToMain'
        );
        
        app.page = new Ext.Panel({
            fullscreen: true,
            layout: 'card',
//			style: 'background-color: black',
            cardSwitchAnimation: 'slide',
            items: [
                new app.ForumList(),
                new app.ThreadList(),
				new app.InfoDetail(),
                new app.ThreadDetail(),
				new app.Login(),
				
            ],
            listeners: {
                'destroy': function(thisComponent) {                    
                }
            }
        });
    }
};